import React from "react";
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
import PreparationAuditorNavigation from "../navigation/PreparationAuditorNavigation";
import InterviewNavigation from "../navigation/InterviewNavigation";
import QuestionnaireNavigation from "../navigation/QuestionnaireNavigation";
import ResearchNavigation from "../navigation/ResearchNavigation";
import PreparationAdminNavigation from "../navigation/PreparationAdminNavigation";

import MaterialCommunityIcons from "react-native-vector-icons/MaterialCommunityIcons";
import { Entypo } from "@expo/vector-icons";
import { Provider, useSelector } from "react-redux";

const Tab = createBottomTabNavigator();

const AdminMainTab = ({ navigation }) => {
  const aauthRole = useSelector((state) => state.authR.authRole);
  return (
    <Tab.Navigator
      initialRouteName="LALALA"
      screenOptions={{
        tabBarActiveTintColor: "#e91e63",
        headerStyle: { backgroundColor: "#009387" },
        headerTintColor: "#fff",
        tabBarHideOnKeyboard: true,
      }}
    >
      {/* <Tab.Screen
        name="preaparation"
        component={
          aauthRole === "admin"
            ? PreparationAdminNavigation
            : PreparationAuditorNavigation
        }
        options={{
          headerShown: false,

          tabBarLabel: "准备工作",
          tabBarIcon: ({ color, size }) => (
            <MaterialCommunityIcons name="home" color={color} size={size} />
          ),
          headerTitleAlign: "center",
        }}
      /> */}
      {/* <Tab.Screen
        name="Interview"
        component={InterviewNavigation}
        options={{
          headerShown: false,
          tabBarLabel: "访谈资料",
          tabBarIcon: ({ color, size }) => (
            <Entypo name="upload-to-cloud" color={color} size={size} />
            // <MaterialCommunityIcons name="bell" color={color} size={size} />
          ),
        }}
      /> */}
      <Tab.Screen
        name="Questionnaire"
        component={QuestionnaireNavigation}
        options={{
          headerShown: false,
          tabBarLabel: "问卷填写",

          tabBarIcon: ({ color, size }) => (
            <MaterialCommunityIcons
              name="file-question"
              color={color}
              size={size}
            />
          ),
        }}
      />
      {/* <Tab.Screen
        name="Research"
        component={ResearchNavigation}
        options={{
          headerShown: false,
          tabBarLabel: "调研报告",
          tabBarIcon: ({ color, size }) => (
            <MaterialIcons name="file-upload" color={color} size={size} />
          ),
        }}
      /> */}
    </Tab.Navigator>
  );
};

export default AdminMainTab;
